package ge.lowlevel;

import ge.exceptions.FunctionNonSuported;

public class IOEngine 
{
	protected static IOEngine delegated;
	public IOEngine()
	{
		
	}
	/**
	 * 	Sets the concrete engine
	 * @param engine
	 */
	static public  void set(IOEngine engine)
	{
		delegated = engine;
	}
	/**
	 * 	
	 * @return gets the concrete DrawEngine
	 */
	static public IOEngine get()
	{
		return delegated;
	}
	/**
	 * 	Checks if the key is pressed
	 * 	It doesn't differences capital letter
	 * @param key Key to ask.
	 * @return True if its checked
	 * @throws FunctionNonSuported if the engine doesn't support it
	 */
	public boolean keyPressed(String key) throws FunctionNonSuported
	{
		throw new FunctionNonSuported("Input/Output Engine","keyPressed");
	}
	/**
	 * 	Checks if the key is pressed just in this moment
	 * 	It doesn't differences capital letter
	 * @param key Key to ask.
	 * @return True if its checked
	 * @throws FunctionNonSuported if the engine doesn't support it
	 */
	public boolean keyDown(String key) throws FunctionNonSuported
	{
		throw new FunctionNonSuported("Input/Output Engine","keyDown");
	}
	/**
	 * 	Checks if a pressed key it's being dropped
	 * 	It doesn't differences capital letter
	 * @param key Key to ask.
	 * @return True if its checked
	 * @throws FunctionNonSuported if the engine doesn't support it
	 */
	public boolean keyUp(String key) throws FunctionNonSuported
	{
		throw new FunctionNonSuported("Input/Output Engine","keyUp");
	}
	/**
	 *  Checks if the mouse button is pressed
	 * 	"LEFT" or "RIGHT" or "MIDDLE"
	 * @param button button to ask.
	 * @return True if its checked
	 * @throws FunctionNonSuported if the engine doesn't support it
	 */
	public boolean mouseDown(String button) throws FunctionNonSuported
	{
		throw new FunctionNonSuported("Input/Output Engine","mouseDown");
	}
	/**
	 *  Checks if a pressed button it's being dropped
	 * 	"LEFT" or "RIGHT"
	 * @param button button to ask.
	 * @return True if its checked
	 * @throws FunctionNonSuported if the engine doesn't support it
	 */
	public boolean mouseUp(String button) throws FunctionNonSuported
	{
		throw new FunctionNonSuported("Input/Output Engine","mouseUp");
	}
	/**
	 * 	The position x of the mouse in the actual layer
	 * @return The position x
	 * @throws FunctionNonSuported if the engine doesn't support it
	 */
	public double mouseX() throws FunctionNonSuported
	{
		throw new FunctionNonSuported("Input/Output Engine","mouseX");
	}
	
	/**
	 * 	The position y of the mouse in the actual layer
	 * @return The position y
	 * @throws FunctionNonSuported if the engine doesn't support it
	 */
	public double mouseY() throws FunctionNonSuported
	{
		throw new FunctionNonSuported("Input/Output Engine","mouseX");
	}
	
	 
}
